<? if ($c = stack('name')) {

	$s = component_settings($c);
	$ux = ($s['param'] == 'id') ? '' : $s['param'].'-';

	?><section id="cpn-<?=$c?>" class="article-list"><?

		?><div class="caption"><?=$s['caption']?></div><?
		
		foreach($d = component_data($c) as $id => $v) {
			?><div class="block"><?

				if ($v['image']) {
					?><a href="<?=$ux.$id?>/" title="<?=h($v['title'])?>" class="image link"><?
						?><img src="<?=$v['image']['fn']?>" alt="<?=h($v['title'])?>" /><?
					?></a><?
				} 
				
				if ($s['showDate'] && $v['date_create']) { ?><div class="date"><?=$v['date']?></div><? }

				?><a href="<?=$ux.$id?>/" title="<?=h($v['title'])?>" class="title link"><?=$v['title']?></a><?

				if ($v['anons']) { ?><div class="anons"><?=strip_tags($v['anons'])?></div><? }

				if ($s['showBody'] && $v['body']) { ?><div class="body"><?=$v['body']?></div><? }
				
				?><div class="clearer"></div><?
				
			?></div><?
		} 
		
		?><div class="clearer"></div><?

		if (sizeof($d = $s['paging']['data'])) { ?><ul class="paging"><?
			foreach ($d as $v) { ?><li class="<?="$v[first] $v[last]"?>"><?
				if ($v['url']) {
					?><a href="<?=$v['url']?>" title="<?=$v['title']?>"><?=$v['title']?></a><?
				} else {
					if ($v['title']) {
						?><strong>[<?=$v['title']?>]</strong><?
					} else {
						?><span>...</span><?
					}
				}
				?></li><?
			}
			?></ul><?
		}

	
	?></section><?
	
	unstack();
} ?>